package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.WholeSaleStatService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.WholeSaleStatSearchRequest;
import com.tuanzi.loan.vo.response.family.WholeSaleStatSearchResponse;
import org.springframework.data.domain.Page;

public class WholeSaleStatDataModel extends BaseLazyDataModel<WholeSaleStatSearchRequest, WholeSaleStatSearchResponse> {
    private static final long serialVersionUID = -5153199995576718546L;

    private WholeSaleStatService wholeSaleStatService= SpringContextHolder.getBean(WholeSaleStatService.class);

    public WholeSaleStatDataModel(WholeSaleStatSearchRequest wholeSaleStatSearchRequest) {
        super(wholeSaleStatSearchRequest);
    }

    @Override
    protected Page<WholeSaleStatSearchResponse> doLoad(PageSearcher<WholeSaleStatSearchRequest> pageSearcher) {
        return wholeSaleStatService.list(pageSearcher);
    }
}
